#ifndef __COMMON_H__
#define __COMMON_H__

/* header files*/
#include "stdint.h"
#include "syslog.h"
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "iostream"

/* macro*/
#define likely(x)	__builtin_expect(!!(x), 1)
#define unlikely(x)	__builtin_expect(!!(x), 0)

#define ture true

/**
* option Macro
* if __DBG__ if define messages will be show in stdout
* else will be log in syslog
*/
#ifdef __DBG__
	#define debug(format, ...) printf(format, ##__VA_ARGS__)
#else
	#define debug(format, ...) syslog(LOG_INFO, format, ##__VA_ARGS__)
#endif

#endif